import { useRoutes } from "react-router-dom";
import Login from '../pages/login';
import Index from "../pages/index";
import Home from '../pages/home'
import VisitorList from '../pages/visitors/visitorList'
import VisitorAdd from "../pages/visitors/VisitorAdd";
const Routes = () => {
    return useRoutes([
        {
            path: '/',
            element: <Login />
        },
        {
            path: '/Index',
            element: <Index />,
            children: [
                {
                    path: 'home', // index属性
                    index: true,
                    element: <Home />
                  },
                {
                    path: 'VisitorList',
                    element: <VisitorList />
                },
                {
                    path: 'VisitorAdd',
                    element: <VisitorAdd />
                },
                
            ]
        }
    ])
}
export default Routes;